/*
 * SonarQube
 * Copyright (C) 2009-2021 SonarSource SA
 * mailto:info AT sonarsource DOT com
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
.source-viewer {
  width: 100%;
  min-height: 200px;
  border: 1px solid var(--gray80);
  box-sizing: border-box;
  background-color: #fff;
  overflow: hidden;
}

.source-table {
  width: 100%;
  border: none;
  border-collapse: collapse;
}

.source-viewer-header {
  position: relative;
  padding: 2px 10px 4px;
  border-bottom: 1px solid var(--barBorderColor);
  background-color: var(--barBackgroundColor);
}

.source-viewer-header-measure {
  vertical-align: middle;
  font-size: var(--baseFontSize);
}

.source-viewer-header-measure .rating {
  font-size: 18px;
}

.source-viewer-header-measure-separator {
  margin: 0 calc(3 * var(--gridSize));
  height: 30px;
  border-right: 1px solid var(--gray80);
}

.source-viewer-header-measure + .source-viewer-header-measure {
  margin-left: calc(3 * var(--gridSize));
}

.source-viewer-header-measure-label {
  display: block;
  line-height: var(--smallFontSize);
  color: var(--secondFontColor);
  font-size: var(--smallFontSize);
}

.source-viewer-header-measure-value {
  display: block;
  margin-top: 2px;
  line-height: 18px;
  color: var(--baseFontColor);
  font-size: var(--bigFontSize);
}

.source-viewer-header-actions {
  display: block;
  margin-left: calc(3 * var(--gridSize));
  padding: var(--gridSize) calc(var(--gridSize) / 2);
}

.source-viewer-header-actions svg {
  margin-top: 2px;
}

.source-viewer-header-more-actions {
  position: absolute;
  z-index: var(--dropdownMenuZIndex);
  right: 0;
  top: 100%;
  padding: 10px;
  border: 1px solid var(--barBorderColor);
  border-right: none;
  background-color: #fff;
  line-height: 1.8;
}

.source-viewer-code {
  overflow-x: auto;
}

.source-viewer-more-code {
  padding: 40px 0;
  border-bottom: 1px solid var(--barBorderColor);
  background-color: var(--barBackgroundColor);
  text-align: center;
}

.source-viewer-more-code .spinner {
  top: -1px;
}

.source-table + .source-viewer-more-code {
  border-bottom: none;
  border-top: 1px solid var(--barBorderColor);
}

.issue-location.highlighted {
  border-color: var(--issueLocationHighlighted);
  background-color: var(--issueLocationHighlighted);
}

.issue-location.selected {
  border-color: var(--issueLocationSelected);
  background-color: var(--issueLocationSelected);
}

.measures-viewer {
  display: flex;
  margin: 0 calc(-1 * var(--gridSize));
}

.measures-viewer + .measures-viewer {
  margin-top: var(--gridSize);
}

.measures-viewer-header {
  font-size: var(--smallFontSize);
}

.measures-viewer-secondary .measures-viewer-card {
  background-color: var(--barBackgroundColor);
}

.measures-viewer-section {
  flex: 1;
}

.measures-viewer-section-limited {
  max-width: 25%;
}

.measures-viewer-card {
  margin: calc(2 * var(--gridSize)) var(--gridSize);
  padding: var(--gridSize);
  border: 1px solid var(--barBorderColor);
  background-color: #fff;
}

.measures + .measures {
  margin-top: calc(2 * var(--gridSize));
  padding-top: calc(2 * var(--gridSize));
  border-top: 1px solid var(--barBorderColor);
}

.measures-chart {
  display: inline-block;
  vertical-align: middle;
  width: calc(var(--gridSize) * 10);
  margin-right: calc(var(--gridSize) * 3);
  text-align: center;
}

.measure {
  line-height: 1.34;
}

.measure-one-line {
  display: flex;
  justify-content: space-between;
}

.measure-one-line .measure-name {
  display: inline;
}

.measure-name {
  display: block;
  font-size: var(--baseFontSize);
}

.measure-value {
  color: var(--darkBlue);
  font-size: var(--bigFontSize);
  font-weight: 400;
}

.measure-big {
  display: inline-block;
  vertical-align: middle;
}

.measure-big .measure-name {
  margin-top: calc(var(--gridSize) / 2);
  margin-bottom: var(--gridSize);
  font-size: var(--bigFontSize);
}

.measure-big .measure-value,
.measure-big .rating {
  font-size: var(--hugeFontSize);
}

.measure-big + .measure-big {
  margin-left: calc(var(--gridSize) * 3);
}
